NFC is a short-range radio frequency (RF) communication technology, typically operating at a distance of 10 cm or less between two communicating devices. Communication via NFC involves an initiator device (often referred to as a “reader”) and a target device.
In a simple NFC communication configuration, the reader can generate an RF field that can power a target that does not require batteries. This configuration enables use of an NFC target having a simple form such as a tag, a sticker, a key fob, or a smart card. Simple NFC targets are typically read-only and directed to a single application, for example, a single-purpose contactless smart card used for payment in connection with a credit card account. In addition to payment, NFC targets have applications in areas such as ticketing, access, RF identification (RFID) tags, loyalty programs, and coupons.
In a more sophisticated NFC communication configuration, the NFC target can be emulated by using a secure element (SE) installed in a “host” device, such as a mobile phone. An SE is a tamper-resistant hardware platform, capable of securely running SE applications and storing confidential and cryptographic data. An SE can be included in the subscriber identity module (SIM) or universal integrated circuit card (UICC) of a mobile device (the host) as an embedded SE (eSE). An SE can also be installed in a secure digital (SD) card that can be inserted in to a mobile device. An NFC controller in the mobile device handles communication between the SE and an NFC reader. Such an arrangement allows the SE to emulate a smart card.
Host-based card emulation (HCE), more often simply “Host Card Emulation,” is a technology that allows an NFC-enabled host device, such as a mobile phone, to appear as an NFC target to an NFC reader, without relying on a conventional passive NFC target or an SE. In a typical HCE implementation, the NFC controller, also referred to as a contactless front end (CLF), can interface with an application running under the operating system (OS) of the host. For example, a mobile phone can run a mobile wallet payment application under the phone's OS. The mobile wallet payment application can communicate with an NFC-enabled point of sale (POS) device via the CLF.
Before the introduction of HCE, requests coming from a contactless reader to communicate with an NFC application in a mobile device were routed to the active SE. HCE implementations must take into account the possible coexistence of NFC card emulation services on an SE and in the host OS. This coexistence requires the CLF to be able to identify the appropriate NFC-enabled application by identifying the environment (for example, SE in a UICC, HCE, eSE) under which the application is available.
One way to accomplish such routing is by using an NFC application identifier (AID). The CLF on the device maintains a routing table that lists AIDs for the applications on the device. When the CLF receives a request to select an application (“SELECT AID” command) from a reader, the CLF searches for the AID in its routing table. If it finds the AID in the CLF routing table, the CLF will route the command to the correct SE or the host OS. A typical application identifier (AID) includes up to sixteen 8-bit bytes.